﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Xml.Serialization;
using System.Runtime.Serialization;

namespace imeem.library
{
    [XmlRoot("item")]
    public class ContentData : Item
    {
        private string _title;
        private string _description;
        private string _ownerId;
        private string _postedBy;
        private double _rating;
        private int _ratingCount;
        private int _viewCount;
        private DateTime _createDate;
        private int _favoriteCount;
        private int _commentCount;
        private string _postedByUrl;

        [XmlElement("title")]
        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }

        [XmlElement("description")]
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        [XmlElement("ownerId")]
        public string OwnerId
        {
            get { return _ownerId; }
            set { _ownerId = value; }
        }

        [XmlElement("postedBy")]
        public string PostedBy
        {
            get { return _postedBy; }
            set { _postedBy = value; }
        }

        [XmlElement("postedByUrl")]
        public string PostedByUrl
        {
            get { return _postedByUrl; }
            set { _postedByUrl = value; }
        }

        [XmlElement("rating")]
        public double Rating
        {
            get { return _rating; }
            set { _rating = value; }
        }

        //[XmlElement("ratingCount", typeof(int))]
        public int RatingCount
        {
            get { return _ratingCount; }
            set { _ratingCount = value; }
        }

        //[XmlElement("viewCount", typeof(int))]
        public int ViewCount
        {
            get { return _viewCount; }
            set { _viewCount = value; }
        }

        //[XmlElement("createDate")]
        public DateTime CreateDate
        {
            get { return _createDate; }
            set { _createDate = value; }
        }

        //[XmlElement("favoriteCount", typeof(int))]
        public int FavoriteCount
        {
            get { return _favoriteCount; }
            set { _favoriteCount = value; }
        }

        //[XmlElement("commentCount", typeof(int))]
        public int CommentCount
        {
            get { return _commentCount; }
            set { _commentCount = value; }
        }
    }
}
